package com.tc168.cp306.b06.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.tc168.cp306.b06.R;
import com.tc168.cp306.b06.activity.SouActivity;
import com.tc168.cp306.b06.activity.SoucountActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;


/**
 * A simple {@link Fragment} subclass.
 */
public class SousuoFragment extends Fragment {


    @BindView(R.id.titlebt)
    Button titlebt;
    @BindView(R.id.countbt)
    Button countbt;
    Unbinder unbinder;

    public SousuoFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_sousuo, container, false);
        unbinder = ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.titlebt, R.id.countbt})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.titlebt:
                startActivity(new Intent(getActivity(),SouActivity.class));
                break;
            case R.id.countbt:
                startActivity(new Intent(getActivity(),SoucountActivity.class));

                break;
        }
    }
}
